package com.aaa.mks.controller;

import com.aaa.mks.entity.BaseArea;
import com.aaa.mks.service.BaseAreaService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 统一地区库(BaseArea)表控制层
 *
 * @author makejava
 * @since 2020-11-26 19:37:58
 */
@RestController
@RequestMapping("baseArea")
public class BaseAreaController {
    /**
     * 服务对象
     */
    @Resource
    private BaseAreaService baseAreaService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public BaseArea selectOne(Integer id) {
        return this.baseAreaService.queryById(id);
    }

    /**
     * 查询所有
     * @param baseArea
     * @return
     */
    @PostMapping("queryAll")
    public List<BaseArea> queryAll(@RequestBody  BaseArea baseArea){
        return this.baseAreaService.queryAll(baseArea);
    }
}